package com.cawis.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProducerController {

    @Value("${spring.application.name}")
    private String applicationName;

    @Value("${spring.profiles}")
    private String profiles;

    @Value("${server.port}")
    private int port;

    @GetMapping("/getConfig")
    public String getConfig() {
        System.out.println("接口被调用");
        return "当前服务:" + applicationName + "运行环境:" + profiles+ "端口:" + port;
    }

}
